<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var str1 = new String("abc");
    var str2 = "abc";
    var str3 = 'abc';

    //length : 3
    //document.write(str3.length);

    //trim()：去除字符串前后空白字符
    var str4 = '   abcd   ';
    //输出1abcd1
    document.write(1 + str4.trim() + 1);
</script>
</body>
</html>